// 视图组件
const view = {
	tabs: () => import('@/layouts/tabs'),
	blank: () => import('@/layouts/BlankView'),
	page: () => import('@/layouts/PageView')
}

// 路由组件注册
const routerMap = {
	login: {
		authority: '*',
		path: '/login',
		component: () => import('@/pages/login')
	},
	root: {
		path: '/',
		name: '首页',
		redirect: '/login',
		component: view.tabs
	},
	dashboard: {
		name: 'Dashboard',
		component: view.blank
	},
	workplace: {
		name: '工作台',
		component: () => import('@/pages/dashboard/workplace')
	},
	analysis: {
		name: '分析页',
		component: () => import('@/pages/dashboard/analysis')
	},
	extension: {
		name: '成员管理',
		icon: 'form',
		component: view.page
	},
	approval: {
		path: 'approval',
		name: '申请审批',
		component: () => import('@/pages/extension/approval')
	},
	member: {
		path: 'member',
		name: '成员管理',
		component: () => import('@/pages/extension/member')
	},
	accounts: {
		path: 'accounts',
		name: '账号管理',
		component: () => import('@/pages/extension/accounts/accounts')
	},
	personal: {
		path: 'personal',
		name: '个人中心',
		component: () => import('@/pages/extension/personal')
	},
	order: {
		name: '订单管理',
		icon: 'table',
		component: view.page
	},
	OrderList: {
		path: 'OrderList',
		name: '订单列表',
		component: () => import('@/pages/order/OrderList')
	},
	OverdueList: {
		path: 'OverdueList',
		name: '逾期列表',
		component: () => import('@/pages/order/OverdueList')
	},
	goods: {
		name: '推广管理',
		icon: 'table',
		component: view.page
	},
	channel: {
		path: 'channel',
		name: '渠道推广',
		component: () => import('@/pages/goods/channel')
	},
	goodslist: {
		path: 'goodslist',
		name: '商品推广',
		component: () => import('@/pages/goods/goodslist')
	},
	// goods: {
	// 	path: 'goods/:goodsId',
	// 	name: '商品查看',
	// 	invisible: true,
	// 	component: () => import("@/pages/goods/goods"),
	// },
	account: {
		name: '财务管理',
		icon: 'table',
		component: view.page
	},
	my: {
		path:"my",
		name: '我的账户',
		component: () => import('@/pages/account/my')
	},
	withdraw: {
		path:"withdraw",
		name: '提现记录',
		invisible: true,     
		component: () => import('@/pages/account/withdraw')
	},
	Withdrawal: {
		path:"Withdrawal",
		name: '流水记录',
		component: () => import('@/pages/account/Withdrawal')
	},
	settlement: {
		path:"settlement",
		name: '结算中心',
		component: () => import('@/pages/account/settlement')
	},
	exp403: {
		authority: '*',
		name: 'exp403',
		path: '403',
		component: () => import('@/pages/exception/403'),
	},
	exp404: {
		name: 'exp404',
		path: '404',
		component: () => import('@/pages/exception/404')
	},
	exp500: {
		name: 'exp500',
		path: '500',
		component: () => import('@/pages/exception/500')
	}
}
export default routerMap
